﻿using System;

namespace MyFloridaHouse.libSvOpenDistricts.ViewModel
{
    public partial class ViewModelBase
    {
        #region properties
        private bool _isBingVisible = true;
        public bool isBingVisible
        {
            get { return _isBingVisible; }
            set
            {
                if (_isBingVisible != value)
                {
                    _isBingVisible = value;
                    NotifyPropertyChanged("isBingVisible");
                    NotifyPropertyChanged("bingCommandLabel");
                }
            }
        }
        public string bingCommandLabel
        {
            get
            {
                if (isBingVisible)
                {
                    return "Hide Bing";
                }
                else
                {
                    return "Show Bing";
                }
            }
        }
        #endregion        #endregion

        #region Commands
        private bool CmdToggleShowBingCanExecute(object parameter)
        {
            return true;
        }

        private void CmdToggleShowBingExecute(object parameter)
        {
            if (isBingVisible)
            {
                isBingVisible = false;
            }
            else
            {
                isBingVisible = true;
            }

        }
        #endregion


    }
}


